import request from '../utils/request'

export function login(username,password) {
  return request({
    url: '/admin/login',
    method: 'post',
    data: {
      username:username,
      password:password
    }
  })
}

export function myLogout() {
  return request({
    url: '/admin/logout',
    method: 'get',
    // params: { token }
  })
}


export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function clearSession() {
  return request({
    url: '/admin/logout',
    method: 'get'
  })
}
